package com.vincent.common.utils;

/**
 * Created by Vincent on 2014/9/22.
 */
public class ParamValidateUtil {
    /**
     * 用户名
     */
    public static final String USERNAME_REG = "^[a-zA-Z]{1}[a-zA-Z0-9]{4,14}$";
    /**
     * 密码
     */
    public static final String PASSWORD_REG = "^[a-zA-Z0-9_*#-@!$%^&\\(\\)=|/?,.<\\[\\]\\{\\}:;>]{6,20}$";
    /**
     * Email
     */
    public static final String EMAIL_REG = "^\\w+([-+.']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$";
    /**
     * 验证码
     */
    public static final String AUTHCODE_REG = "^[a-zA-Z0-9]{6}$";
    /**
     * 题库名字
     */
    public static final String QUESTIONBANK_NAME_REG = "^[a-zA-Z0-9\\u4e00-\\u9fa5]{5,50}$";
    /**
     * 组织名字
     */
    public static final String ORGANIZATION_NAME_REG = "^[\\(\\)\\（\\）a-zA-Z0-9\\u4e00-\\u9fa5]{2,20}$";
    /**
     * 姓名
     */
    public static final String REALNAME_REG = "^[a-zA-Z\\u4e00-\\u9fa5]{2,10}$";
    /**
     * 联系电话
     */
    public static final String PHONE_REG = "((\\d{11})|^((\\d{7,8})|(\\d{4}|\\d{3})-(\\d{7,8})|(\\d{4}|\\d{3})-(\\d{7,8})-(\\d{4}|\\d{3}|\\d{2}|\\d{1})|(\\d{7,8})-(\\d{4}|\\d{3}|\\d{2}|\\d{1}))$)";
    /**
     * 权限
     */
    public static final String PERMISSION="^([a-z]+):([a-z]+)$";
    /**
     * 权限描述
     */
    public static final String PERMISSION_DESC="^[a-zA-Z\\u4e00-\\u9fa5]{4,10}$";
    /**
     * 权限分类
     */
    public static final String PERMISSION_CATEGORY="^[a-zA-Z\\u4e00-\\u9fa5]{2,10}$";
    /**
     * 角色
     */
    public static final String ROLE="^[a-zA-Z]{5,20}$";
    /**
     * 角色描述
     */
    public static final String ROLE_DESC="^[a-zA-Z\\u4e00-\\u9fa5]{4,10}$";

}
